package com.ayf.payment.game.api.controller;

import com.ayf.payment.game.api.cache.redis.RedisCacheUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Description: 二维码控制层
 * @Author: zh-liang
 * @Date : 2021-04-12 11:21
 */
@RestController
@RequestMapping("/v4")
public class AybQrCodeController {

    @Autowired
    private RedisCacheUtil redisCacheUtil;

    /**
     * 获取二维码信息
     */
    @PostMapping("/qrCode/{key}")
    public Map<String, Object> getQrCode(@PathVariable("key") String key) {
        return redisCacheUtil.getObjectFromCache(key);
    }

}
